#include "StdAfx.h"
#include "gamebutton.h"
#include "mainmenu.h"

static const char* cosmosTexture = ":/galcon/Resources/images/main_menu_background.png";

MainMenu::MainMenu(QObject *parent)
   : QGraphicsScene(parent)
{
   initScene();
}

MainMenu::~MainMenu()
{

}

void MainMenu::initScene()
{
   m_localGameBtn = boost::make_shared<GameButton>(Planets[Neptune], "Local game");
   m_lanGameBtn = boost::make_shared<GameButton>(Planets[Neptune], "LAN game");
   m_quitGameBtn = boost::make_shared<GameButton>(Planets[Neptune], "Quit");
   QPixmap backgroundTexture(cosmosTexture);
   m_backgroundBrush = boost::make_shared<QBrush>(backgroundTexture);
   setBackgroundBrush(*m_backgroundBrush);
   addItem(m_localGameBtn.get());
   m_localGameBtn->setPos(100, 100);
   addItem(m_lanGameBtn.get());
   m_lanGameBtn->setPos(100, 200);
   addItem(m_quitGameBtn.get());
   m_quitGameBtn->setPos(100,300);

}